package com.xiaomili.halfsugar.activity;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.xiaomili.halfsugar.R;
import com.xiaomili.halfsugar.adapter.ChildAdapter;

import java.util.List;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * Created by Administrator on 2016/7/20 0020.
 */
public class ShowImageActivity extends Activity {
    @InjectView(R.id.rec_child)
    RecyclerView recChild;
    private GridLayoutManager manager;
    private ChildAdapter adapter;
    private List<String> mDatas;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.reccy_child);
        ButterKnife.inject(this);
        manager = new GridLayoutManager(this,4);
        adapter = new ChildAdapter(this,mDatas);
        mDatas = getIntent().getStringArrayListExtra("data");
        recChild.setAdapter(adapter);
        recChild.setLayoutManager(manager);
    }

}
